import request from '@/utils/request'

export function getFirmware(params) {
  return request({
    url: '/portal/firmware/page',
    method: 'get',
    params
  })
}

export function getFirmwareList(params) {
  return request({
    url: '/portal/firmware/list',
    method: 'get',
    params
  })
}

export function addFirmware(data) {
  return request({
    url: '/portal/firmware',
    method: 'post',
    data
  })
}

export function editFirmware(data) {
  return request({
    url: '/portal/firmware',
    method: 'put',
    data
  })
}

export function delFirmware(id) {
  return request({
    url: `/portal/firmware/${id}`,
    method: 'delete'
  })
}
